package nc.bs.gl.excel.bp;

import nc.bs.framework.common.RuntimeEnv;
import nc.pub.gl.excel.util.StreamUtils;

public class ExportBp {
	
	private static String tpath = null;
	private static String epath = null;
	
	public byte[] execTemplate() {
		
		return StreamUtils.File2byte(templetPath());
	}
	
	public byte[] execExport() {
		
		return StreamUtils.File2byte(exportPath());
	}
	
	private static String templetPath(){
		
		if(tpath == null){
			String nchome = RuntimeEnv.getInstance().getNCHome();
			tpath = nchome + "/resources/gl/excel/templet.xls";
		}
		
		return tpath;
	}
	
	private static String exportPath(){
		
		if(epath == null){
			String nchome = RuntimeEnv.getInstance().getNCHome();
			epath = nchome + "/resources/gl/excel/export.xls";
		}
		
		return epath;
	}
}
